package com.demo.ddtalk.controller;

import com.demo.ddtalk.config.AppConfig;
import com.demo.ddtalk.mapper.ExpDocMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;


@Controller
public class UserController {

    private AppConfig appConfig;

    @Autowired
    public UserController(
            AppConfig appConfig
    ) {
        this.appConfig = appConfig;
    }

    @Autowired
    private ExpDocMapper expDocMapper;

    @GetMapping(value = "/hello")
    public String hello(Model model) {
        System.out.println("=========================hello================");
        model.addAttribute("corpid", appConfig.getCorpId());
        return "index";
    }


}
